/*
 * RecordStorageStrategy.h
 *
 *  Created on: 03/10/2009
 *      Author: nik0l4z
 */

#ifndef RECORDSTORAGESTRATEGY_H_
#define RECORDSTORAGESTRATEGY_H_
#include "StorageStrategy.h"
//#include "Registro.h"
#include "TablaEspacioLibre.h"
//#include "../Strategies/Resource/ResourceStrategy.h"

class RecordStorageStrategy : public StorageStrategy{

	private: Almacenamiento *almacenamiento;

	private: int tamanio;

	private: TablaEspacioLibre *tabla;

	public: RecordStorageStrategy();

	public: RecordStorageStrategy(int tamanio, string nombreArchivo);

	public: virtual ~RecordStorageStrategy();

	public: virtual int saveData(Dato * data);

	public: void virtual setStorage(Almacenamiento *storage);

	public: virtual Almacenamiento *getStorage() const;

	public: virtual string getData(Clave *clave, int fileReference);

	public: virtual int updateData(Dato *data,int filePos);

	public: virtual void deleteData(int fileReference);

};

#endif /* RECORDSTORAGESTRATEGY_H_ */
